package com.bjsxt.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bjsxt.domain.Market;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bjsxt.mapper.UserFavoriteMarketMapper;
import com.bjsxt.domain.UserFavoriteMarket;
import com.bjsxt.service.UserFavoriteMarketService;

/**
 * @Description:  ${description}
 * @ClassName:      UserFavoriteMarketServiceImpl
 * @Author:  chenyu
 * @Date:    2025/3/19 17:48
 */
 
@Service
public class UserFavoriteMarketServiceImpl extends ServiceImpl<UserFavoriteMarketMapper, UserFavoriteMarket> implements UserFavoriteMarketService{
    @Override
    public boolean delUserFavoriteMarket(Long userId, Market marketDb) {
        return remove(new LambdaQueryWrapper<UserFavoriteMarket>().eq(UserFavoriteMarket::getMarketId, marketDb.getId())
        .eq(UserFavoriteMarket::getUserId, userId));
    }
}
